/*
 * Copyright(C) 2012 Luvina Software Company
 *
 * TblUserDao.java, May 28, 2012 HaiPD
 */
package net.luvina.manageuser.dao;

import java.util.List;

import net.luvina.manageuser.dto.UserDetailDto;
import net.luvina.manageuser.hibernate.TblUser;

/**
 * Interface TblUserDao
 *
 * @author HaiPD
 *
 */
public interface TblUserDao extends GenericDao<TblUser, Integer> {
	/**
	 * getListUser method
	 *
	 * @param offset
	 *            offset
	 * @param limit
	 *            limit
	 * @param groupId
	 *            groupId
	 * @param fullName
	 *            fullName
	 * @param sortType
	 *            sortType
	 * @param sortByFullName
	 *            sortByFullName
	 * @param sortByCodeLevel
	 *            sortByCodeLevel
	 * @param sortByEndDate
	 *            sortByEndDate
	 * @return List UserDetailDto UserDetailDto
	 */
	public List<UserDetailDto> getListUser(int offset, int limit, int groupId,
			String fullName, String sortType, String sortByFullName,
			String sortByCodeLevel, String sortByEndDate);

	/**
	 * method getTotalRecords
	 *
	 * @param groupId
	 *            group id
	 * @param full_name
	 *            full name
	 * @return total records
	 */
	public int getTotalRecords(int groupId, String full_name);

	/**
	 * check existed login name
	 *
	 * @param userId
	 *            user id
	 * @param loginName
	 *            login name
	 * @return object tbluser
	 */
	public TblUser checkExistedLoginName(final int userId,
			final String loginName);

	/**
	 * check existed email
	 *
	 * @param userId
	 *            user id
	 * @param email
	 *            email
	 * @return object tblUser
	 */
	public TblUser getUserByEmail(final int userId, final String email);
}
